/*
 * Platine.java
 *
 * Created on May 6, 2007, 2:01 PM
 *
 */

package sbc.fabrik.model;

import java.io.Serializable;
import java.util.List;

/**
 *
 * @author lazafi
 */
public class Platine implements Serializable {
    private int pid;
    private List<Sensor> sensors;
    
    /** Creates a new instance of Platine */
    public Platine() {
    }

    public Platine(int pid) {
        setPid(pid);
    }

    public int getPid() {
        return pid;
    }

    public void setPid(int pid) {
        this.pid = pid;
    }

    public List<Sensor> getSensors() {
        return sensors;
    }

    public void setSensors(List<Sensor> sensors) {
    if (sensors.size() > 3)
        System.out.println("EE");
        this.sensors = sensors;
    }

    public String toString() {
        String retValue = "Platine" + " " + "{" + pid + "}";
        if (sensors != null) {
            for (Sensor s: getSensors())
                retValue = retValue.concat("<" + s.toString() + ">");
        }
        return retValue;
    }
    
}
